import { createSlice, configureStore } from '@reduxjs/toolkit'
import { Dispatch } from 'react';
const initialState:{dark:'light' | 'dark'} = {
    dark: "light"
}
const darksSlice = createSlice({
    name: 'darks',
    initialState,
    reducers: {
        setDark: (state, action) => {
            state.dark = action.payload
        },
        removeDark: (state) => {
            state.dark = "light"
        }
    }
})
export const { setDark, removeDark } = darksSlice.actions
export default darksSlice.reducer
